package org.example.psn.core.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.example.system.common.bean.BaseEntity;

/**
 * <p>
 * 组织架构
 * </p>
 *
 * @author Joey
 * @since 2021-05-11
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="Group对象", description="组织架构")
public class Group extends BaseEntity {

    private static final long serialVersionUID=1L;

    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "父级id")
    @TableField("parentId")
    private Long parentId;

    @ApiModelProperty(value = "路径级别")
    @TableField("idPath")
    private String idPath;

    @ApiModelProperty(value = "分组名称")
    @TableField("groupName")
    private String groupName;

    @ApiModelProperty(value = "分组标识")
    @TableField("groupKey")
    private String groupKey;

    @ApiModelProperty(value = "分组类别")
    @TableField("groupType")
    private Integer groupType;

    @ApiModelProperty(value = "维度")
    @TableField("dimensionType")
    private Integer dimensionType;

    @ApiModelProperty(value = "序号")
    @TableField("sortNum")
    private Integer sortNum;
}
